<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
    <?php echo $infocustomer?>      
    <div class="box">
        <div class="heading">
         <h1><img src="view/image/report.png" alt="" /> <?php echo $heading_title2; ?></h1>     
         
         <div class="buttons">
             
             <a class="button" href="<?php echo $link['href']; ?>" target="_blank">In Hóa Đơn</a></div>
           <div class="buttons">
                  
                  
                  <a align="center" onclick="window.open('<?php echo $export_excel; ?>', '_blank')" class="button"><?php echo $button_export_excel; ?></a>                
        </div>
        </div>
        
      
        <div class="content">
        <table class="list" >
         <thead>
          <tr>
            <td class="left"><?php echo $name; ?></td>
            <td class="left"><?php echo $quantity; ?></td>
            <td class="left"><?php echo $amount; ?></td>            
          </tr>
        </thead>
        <tbody>     
            <?php foreach ($detailed as $detail) { ?>
             <tr>
            <td><?php echo $detail['name']?></td>  
            <td class="left"><?php echo $detail['quantity']; ?></td>
            <td><?php echo $detail['amount']?></td>  
           <!-- <td class="center"><?php foreach ($detailed['detailed'] as $detailed) { ?>
                 <a href="<?php echo $detailed['href']; ?>">open</a> 
                <?php } ?></td> -->          
            <?php } ?>
             </tr>    
        </tbody>
         
        </table>
         <div class="pagination"><?php echo $pagination; ?></div>
        </div>  
          
    </div> 
    <?php echo $footer; ?>
    <script type="text/javascript"><!--
function open_win() {
	url = 'index.php?route=crmcustomer/customer&token=<?php echo $token; ?>';	
	var last_name = $('input[name=\'last_name\']').attr('value');
	
	if (last_name) {
		url += '&last_name=' + encodeURIComponent(last_name);
	}
	var first_name = $('input[name=\'first_name\']').attr('value');
	
	if (first_name) {
		url += '&first_name=' + encodeURIComponent(first_name);
	}
	var phonemobile = $('input[name=\'phonemobile\']').attr('value');
	
	if (phonemobile) {
		url += '&phonemobile=' + encodeURIComponent(phonemobile);
	}
	
	var point = $('input[name=\'point\']').attr('value');
	
	if (point) {
		url += '&point=' + encodeURIComponent(point);
	}
	
	location = url;
}
//--></script> 